import { getDepartmentList } from "../../api/department";
export default {
  namespaced: true,
  state: {
    departmentList: [],
  },
  actions: {
    async getDepartmentList({ commit }) {
      const data = await getDepartmentList();
      commit("setDepartmentList", data.data.data.data);
    }
  },
  mutations: {
    setDepartmentList(state, departmentList) {
      state.departmentList = departmentList;
    }
  },
};
